home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-24 | 1.1 KB | 76 lines | [TEXT/CWIE] |
- /*
- File: LFixedSizeArray.cp
-
- Contains: LArray template wrapper class.
-
- Version: 1.0
-
- Copyright: ©1996 Chris K. Thomas. All Rights Reserved.
- */
-
- #include "LFixedSizeArray.h"
-
- //
- // instance lifetimes
- //
-
- template <class T>
- LFixedSizeArray<T>::LFixedSizeArray()
- :LArray(sizeof(T))
- {
-
- }
-
- template <class T>
- LFixedSizeArray<T>::LFixedSizeArray(T **inHandle)
- :LArray(sizeof(T), (Handle)inHandle)
- {
-
- }
-
-
- template <class T>
- LFixedSizeArray<T>::~LFixedSizeArray()
- {
-
- }
-
- //
- // Accessors
- //
-
- template <class T>
- void
- LFixedSizeArray<T>::InsertItem(ArrayIndexT inAtIndex, T& inItem)
- {
- LArray::InsertItemsAt(1, inAtIndex, &inItem);
- }
-
- template <class T>
- void
- LFixedSizeArray<T>::RemoveItem(ArrayIndexT inAtIndex)
- {
- LArray::RemoveItemsAt(1, inAtIndex);
- }
-
- template <class T>
- void
- LFixedSizeArray<T>::SetItem(ArrayIndexT inAtIndex, T& inItem)
- {
- AssignItemsAt(1, inAtIndex, &inItem);
- }
-
- template <class T>
- Boolean
- LFixedSizeArray<T>::GetItem(ArrayIndexT inAtIndex, T& outItem)
- {
- return FetchItemAt(inAtIndex, &outItem);
- }
-
- template <class T>
- UInt32
- LFixedSizeArray<T>::GetCount()
- {
- return LArray::GetCount();
- }
-